//
//  LSCustomBtn.m
//  HappyStore
//
//  Created by 陈锋 on 16/8/10.
//  Copyright © 2016年 LLJ. All rights reserved.
//

#import "LSCustomBtn.h"

@implementation LSCustomBtn

-(instancetype)initWithFrame:(CGRect)frame{

    if (self = [super initWithFrame:frame]) {
        
        CGFloat  with = frame.size.width;
        CGFloat height = frame.size.height;
        
        [self setBackgroundColor:[UIColor whiteColor]];
        
        self.layer.masksToBounds = YES;
        self.layer.cornerRadius = 5.0f;
        self.layer.borderWidth = 0.8f;
        self.layer.borderColor = [UIColor whiteColor].CGColor;
        
        UILabel * timingLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, with, height/2)];
        timingLabel.font = [UIFont systemFontOfSize:14.0f];
        timingLabel.textColor = [UIColor lightGrayColor];
        timingLabel.textAlignment = NSTextAlignmentCenter;
        
        UILabel* moneyLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, height/2, with, height/2)];
        moneyLabel.textColor = [UIColor lightGrayColor];
        moneyLabel.font = [UIFont systemFontOfSize:13.0f];
        moneyLabel.textAlignment = NSTextAlignmentCenter;
        
        [self addSubview:timingLabel];
        [self addSubview:moneyLabel];
    }
    return self;
}

@end
